Problem Note 59265: SCHEMA= is not honored with the SORT procedure when running against Netezza
When you run the SORT procedure against a Netezza table, the schema specified with the SCHEMA= LIBNAME option might be ignored. This behavior might result in errors referencing the table in the ADMIN schema rather than the one you specified, or it might cause incorrect results.
Example 1
In the following example, the expected results are that the sort of the Netezza table TEST.MYSCHEMA.TESTSORT is written to a new Netezza table TEST.MYSCHEMA.TESTSORTOUT.
libname nz netezza server=server-name user=user-ID pwd=password database=database-name schema=MY-SCHEMA;
proc sort data=nz.testsort out=nz.testsortout nodupkey;
by a;
run;
The following error occurs when the SAS generated query does not include the schema and the table TESTSORT does not exist in the ADMIN schema:
ERROR: CLI execute error: ERROR: relation does not exist TEST.ADMIN.TESTSORTOUT
ERROR: Error during in-database processing.
ERROR: SQL generation encountered a critical failure and cannot revert to standard processing. To avoid this failure, set the SQLGENERATION option to NONE.
The error "CLI execute error: ERROR: Relation 'TEST.ADMIN.TESTSORTOUT' does not have attribute 'varname'" might occur if the following conditions are true:
- The Netezza table TESTSORT is in both the ADMIN schema and the MY-SCHEMA schema.
- The Netezza table TESTSORTOUT is present in only the ADMIN schema.
- TESTSORTOUT has a different set of variables from TESTSORT.
Example 2
In the following example, the expected results are that the sort of the Netezza table TEST.MYSCHEMA.TESTSORT is written to the SAS data set WORK.TESTSORTOUT.
libname nz netezza server=server-name user=user-ID pwd=password database=database-name schema=MY-SCHEMA;
proc sort data=nz.testsort out=work.testsortout nodupkey;
by a;
run;
However, when the Netezza table TESTSORT is in both the ADMIN schema and the MY-SCHEMA schema, but the data in the two tables is different, the output from the sort might be from the ADMIN.TESTSORT.
Workaround
To work around the above behaviors, set the system option SQLGENERATION to NONE as shown below:
options sqlgeneration=none;
Operating System and Release Information
SAS System | SAS/ACCESS Interface to Netezza | Microsoft® Windows® for x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows 8 Enterprise 32-bit | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows 8 Enterprise x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows 8 Pro 32-bit | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows 8 Pro x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows 8.1 Enterprise x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows 8.1 Pro 32-bit | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows 8.1 Pro x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows 10 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows Server 2008 | 9.4_M3 | | 9.4 TS1M3 | |
Microsoft Windows Server 2008 R2 | 9.4_M3 | | 9.4 TS1M3 | |
Microsoft Windows Server 2008 for x64 | 9.4_M3 | | 9.4 TS1M3 | |
Microsoft Windows Server 2012 Datacenter | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows Server 2012 R2 Std | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Microsoft Windows Server 2012 Std | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Windows 7 Enterprise 32 bit | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Windows 7 Enterprise x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Windows 7 Home Premium 32 bit | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Windows 7 Home Premium x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Windows 7 Professional 32 bit | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Windows 7 Professional x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Windows 7 Ultimate 32 bit | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Windows 7 Ultimate x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
64-bit Enabled AIX | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
64-bit Enabled Solaris | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
HP-UX IPF | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
Linux for x64 | 9.4_M3 | 9.4_M3 | 9.4 TS1M3 | 9.4 TS1M5 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | alert |
Date Modified: | 2016-12-05 13:39:01 |
Date Created: | 2016-10-28 15:03:20 |